figure.Panel = new Class({
    Extends: figure.DomFigure,

    initialize: function(id, x, y) {
        this.parent(x,y);
        this.createElement('canvas',{
            id: id,
            Width: 600,
            Height: 600,
            css: {
                border :1, position: 'absolute', top: y + 'px', left: x + 'px'
            }
        });
        this.id = id;
    },

    draw: function() {
        var context = $("#" + this.id)[0].getContext('2d');
        var bw = 400;
        var bh = 400;
        var p = 10;
        var cw = bw + (p*2) + 1;
        var ch = bh + (p*2) + 1;

            for (var x = 0; x <= bw; x += 40) {
                context.moveTo(0.5 + x + p, p);
                context.lineTo(0.5 + x + p, bh + p);
            }


            for (var x = 0; x <= bh; x += 40) {
                context.moveTo(p, 0.5 + x + p);
                context.lineTo(bw + p, 0.5 + x + p);
            }

            context.strokeStyle = "black";
            context.stroke();
        }

});
